package com.yc.boottxx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * <p>
 * 天下行租车-车辆表-10
 * </p>
 *
 * @author xl
 * @since 2024-05-07
 */
@Data
@TableName("txx_car")
public class Car implements Serializable {
  private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 品牌
     */
    @NotEmpty(message = "品牌不能为空哦!宝")

    private String brand;

    /**
     * 型号
     */
    @NotEmpty(message = "车型不能为空哦!宝")
    private String model;

    /**
     * 封面图片
     */
    private String image;

    /**
     * 车辆介绍
     */
    @NotEmpty(message = "简单介绍下车辆吧!!宝")
    private String intro;

    /**
     * 租赁价格: 元/天
     */
    @NotNull(message = "价格不能为空的哦!宝")
    private BigDecimal price;

    /**
     * 星级评分: 1~5
     */
    private Byte stars;

    /**
     * 状态: 在库,出库,维修
     */
    @NotEmpty(message = "车辆的状态信息得填哦!宝")
    private String state;

    /**
     * 购入时间
     */
    private Timestamp intime;


    //关联查询
    @TableField(exist = false)
    private List<Image> photo;

    @TableField(exist = false)
    private String sort;

    @TableField(exist = false)
    private String sc;
}
